package com.lynn.boot.rabbitmqconsumer.listener;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @Description:
 * @Date: 2019-11-12 15:59
 * @Auther: lynn
 */
@Component
@RabbitListener(queues = "queue")//监听的队列名称 queue
public class QueueReceiver {
    @RabbitHandler
    public void process(Map testMessage) {
        System.out.println("QueueReceiver消费者收到消息  : " + testMessage.toString());
    }
}
